package com.decade.service.impl;

import com.decade.mapper.DoorMapper;
import com.decade.pojo.Door;
import com.decade.service.DoorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DoorServiceImpl implements DoorService {
    @Autowired
    private DoorMapper doorMapper;

    @Override
    public int addDoor(Door door) {
        return doorMapper.addDoor(door);
    }

    @Override
    public List<Door> queryDoorList() {
        return doorMapper.queryDoorList();
    }

    @Override
    public Door queryDoorById(int id) {
        return doorMapper.queryDoorById(id);
    }

    @Override
    public List<Door> queryDoorLike(Door door) {
        return doorMapper.queryDoorLike(door);
    }

    @Override
    public int deleteDoorById(int id) {
        return doorMapper.deleteDoorById(id);
    }

    @Override
    public int updateDoorById(Door door) {
        return doorMapper.updateDoorById(door);
    }
}
